package com.sunshine.order.server.form;

import lombok.Data;
import lombok.ToString;

import javax.validation.constraints.NotEmpty;

/**
 * form 文件夹下存放请求入参    <br />
 * 前端入参格式如下：
 * name: "张三"
 * phone: "18868822111"
 * address: "深圳南山大道"
 * openid: "ew3euwhd7sjw9diwkq" //用户的微信openid
 * items: [{
 *     productId: "1423113435324",
 *     productQuantity: 2 //购买数量
 * }]
 *
 * @author WeiHong
 * @date 2019/8/5 10:51
 */
@Data
@ToString
public class OrderForm {

    /**
     * 买家姓名
     */
    @NotEmpty(message = "姓名必填")
    private String name;

    /**
     * 买家手机号
     */
    @NotEmpty(message = "手机号必填")
    private String phone;

    /**
     * 买家地址
     */
    @NotEmpty(message = "地址必填")
    private String address;

    /**
     * 买家微信openid
     */
    @NotEmpty(message = "openid必填")
    private String openid;

    /**
     * 购物车
     */
    @NotEmpty(message = "购物车不能为空")
    private String items;


}
